
#ifndef DRAWSTRIPESHAPEFILTER_H
#define DRAWSTRIPESHAPEFILTER_H

#include <BImage>
#include <BPicker>
#include <BEventFilter>

#include "LineStripe.h"

class DrawLineStripeFilter : public BEventFilter
{
public:
	DrawLineStripeFilter(BEventFilter* parent = 0);
	~DrawLineStripeFilter();

protected:
	void slotAssetChanged(BObject* object, const BValue& value);

protected:
	virtual void attached(BWidget* widget);
	virtual void detached(BWidget* widget);

	virtual void updateEvent(const BEvent& event);

	virtual void styleEvent(const BEvent& event);
	virtual void freshEvent(const BEvent& event);
	virtual void paintEvent(const BEvent& event);

	virtual void keyPressEvent(const BKeyEvent& keyEvent);

	virtual void mouseEnterEvent(const BMouseEvent& mouseEvent);
	virtual void mouseLeaveEvent(const BMouseEvent& mouseEvent);
	virtual void mousePressEvent(const BMouseEvent& mouseEvent);
	virtual void mouseReleaseEvent(const BMouseEvent& mouseEvent);
	virtual void mouseMoveEvent(const BMouseEvent& mouseEvent);

	virtual void mouseClickEvent(const BMouseEvent& mouseEvent);

private:
	BHolder<LineStripe>		_lineStripe;
	BHolder<BImage>			_dragImage;
	bool					_lineChanged;
	BPoint					_hoverPoint;
	int						_hoverIndex;
	BPoint					_pressedPoint;
	BIntArray				_selectedIndices;
	BPointArray				_selectedPoints;
};

#endif
